Artificial intelligence-based system and method for grading collectible trading cards

ABSTRACT

A system and method for digitally grading collectible trading cards on a predefined standard scale. The collectible trading cards are graded using their images. First, an image is converted to grayscale image. The grayscale image is subjected to a set of algorithms, such as edge detection algorithm, threshold inversion algorithm, wavelet transform algorithm, corner detection algorithm, color filtering algorithm, and an image sharpen algorithm to obtain respective image features as outputs. The output can be processed using a bag of visual words computer vision model to obtain quantitative data. The quantitative data can then be processed using a pre-trained machine learning model to obtain a grade for the collectible trading card.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority from a U.S. Provisional Patent Appl.No. 63/185,547 filed on May 7, 2021, which is incorporated herein byreference in its entirety.

FIELD OF INVENTION

The present invention relates to a system and method for gradingcollectible trading cards, and more particularly, the present inventionrelates to a system and method that uses a combination of imageprocessing and artificial intelligence for grading collectible tradingcards.

BACKGROUND

Trading cards are collectible objects that are in the form of an imagecard. The trading card can be made from thick paper or a paper board.The image can be of a person, thing, or place. The person can be anypopular person, such as a sports celebrity. Similarly, an importantevent, place, or thing can be the image on the trading card. A briefdescription is also provided for the image on the trading card.

Card grading is a process of authenticating and ranking a trading cardby third-party services. The card is first evaluated for authenticityand then ranked on a pre-determined scale. The trading card can then bepacked safely and cataloged. Valuation of the card can also be done. Thephysical card grading process is laborious, slow, and time-consuming. Aneed for digitalized card grading process is desired. Few methods fordigital card grading are known in the art. For example, a U.S. Pat. No.9,767,163 granted to Tag P LLC entitled “Computerized technicalauthentication and grading system for collectible objects” discloses acomputerized system and method of grading and authenticatingcollectibles utilizing digital imaging devices and processes to providean objective, standardized, consistent high-resolution grading ofcollectible objects, such as but not limited to sport and non-sporttrading cards. The disclosure eliminates the subjectivity present in thehuman grading process and overcomes the inherent limitations of thehuman eye. The known apparatuses and methods for digital card gradinguse costly and complex equipment, such as specialized image acquisitiondevices.

A need is therefore appreciated for a system and method for digital cardgrading that is devoid of the above drawbacks.

SUMMARY OF THE INVENTION

The following presents a simplified summary of one or more embodimentsof the present invention to provide a basic understanding of suchembodiments. This summary is not an extensive overview of allcontemplated embodiments and is intended to neither identify criticalelements of all embodiments nor delineate the scope of any or allembodiments. Its sole purpose is to present some concepts of one or moreembodiments in a simplified form as a prelude to the more detaileddescription that is presented later.

The principal object of the present invention is therefore directed to asystem and method for digital card grading that is simple to use.

It is another object of the present invention that additional equipmentis not required making the process cost-effective.

It is still another object of the present invention that the method istime-efficient.

It is a further object of the present invention that the system andmethod are trustworthy.

It is a further object of the present invention to avoid the need ofsending physical cards for grading.

It is still a further object of the present invention that human errorand any other subjective error can be avoided resulting in reproductiveresults.

In one aspect, disclosed is a system and method for grading acollectible trading card on a predefined scale, the method implementedwith the system comprising a processor and a memory, the methodcomprises receiving, an image of the collectible trading card from auser device; converting the image to a grayscale image; applying an edgedetection algorithm to the grayscale image to extract edge features;applying a threshold inversion algorithm to the grayscale image toextract contrast/centering features; applying a wavelet transformalgorithm to the grayscale image to extract texture/surface features;applying a corner detection algorithm to the grayscale image to extractcorner information; applying a color filtering algorithm to thegrayscale image to extract stain detection features; applying an imagesharpen algorithm to the grayscale image to obtain an output andcomparing the output with the image to obtain out-of-focus information;processing the edge features, contrast/centering features,texture/surface features, corner information, stain detection features,and out-of-focus information using a bag-of-visual-words model to obtainquantitative data; and subjecting the quantitative data to a pre-trainedmachine learning model to obtain a grade for the collectible tradingcard, wherein the grade is associated to the collectible trading card.The method further comprises capturing the image of the collectibletrading card by a camera coupled to the user device. The method furthercomprises training a machine learning model using a set of pre-gradedtraining images of collectible trading cards to obtain the pre-trainedmachine learning model. The method further comprises converting eachtraining image of the pre-graded training images to a grayscale trainingimage; processing each grayscale training image using a plurality ofpredefined algorithms to obtain a plurality of outputs, the plurality ofpredefined algorithms comprise the edge detection algorithm, thethreshold inversion algorithm, the wavelet transform algorithm, thecorner detection algorithm, the color filtering algorithm, and the imagesharpen algorithm; subjecting the plurality of outputs to thebag-of-visual-words model to obtain respective quantitative data foreach output; and generating a feature vector for each output using therespective quantitative data, wherein the feature vector is configuredto grade the respective output based on the respective quantitativedata.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying figures, which are incorporated herein, form part ofthe specification and illustrate embodiments of the present invention.Together with the description, the figures further explain theprinciples of the present invention and enable a person skilled in therelevant arts to make and use the invention.

FIG. 1 is a block diagram showing the architecture and environment ofthe disclosed system, according to an exemplary embodiment of thepresent invention.

FIG. 2 is a flow chart showing an exemplary embodiment of the imageprocessing module, according to an exemplary embodiment of the presentinvention.

DETAILED DESCRIPTION

Subject matter will now be described more fully hereinafter. Subjectmatter may, however, be embodied in a variety of different forms and,therefore, covered or claimed subject matter is intended to be construedas not being limited to any exemplary embodiments set forth herein;exemplary embodiments are provided merely to be illustrative. Likewise,reasonably broad scope for claimed or covered subject matter isintended. Among other things, for example, the subject matter may beembodied as apparatus and methods of use thereof. The following detaileddescription is, therefore, not intended to be taken in a limiting sense.

The word “exemplary” is used herein to mean “serving as an example,instance, or illustration.” Any embodiment described herein as“exemplary” is not necessarily to be construed as preferred oradvantageous over other embodiments. Likewise, the term “embodiments ofthe present invention” does not require that all embodiments of theinvention include the discussed feature, advantage, or mode ofoperation.

The terminology used herein is to describe particular embodiments onlyand is not intended to be limiting to embodiments of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context indicatesotherwise. It will be further understood that the terms “comprise”,“comprising,”, “includes” and/or “including”, when used herein, specifythe presence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The following detailed description includes the best currentlycontemplated mode or modes of carrying out exemplary embodiments of theinvention. The description is not to be taken in a limiting sense but ismade merely to illustrate the general principles of the invention sincethe scope of the invention will be best defined by the allowed claims ofany resulting patent.

The following detailed description is described with reference to thedrawings, wherein like reference numerals are used to refer to likeelements throughout. In the following description, for purposes ofexplanation, specific details may be outlined to provide a thoroughunderstanding of the subject innovation. It may be evident, however,that the claimed subject matter may be practiced without these specificdetails. In other instances, well-known structures and apparatus areshown in block diagram form to facilitate describing the subjectinnovation. Moreover, the drawings may not be to scale.

Disclosed is a system and method for the digital grading of collectibletrading cards. The disclosed system and method use image recognitionalgorithms and artificial intelligence for card grading, thus does notrequire any specialized image recognition devices, making the processcost-effective and faster. Referring FIG. 1 is a block diagram showingthe architecture of the disclosed system 100. The system can receive animage of the trading card and can process the image using a combinationof image recognition algorithms and artificial intelligence for grading.The image of the card can be analyzed for the condition of its surface,corners, edges, stains, out-of-focus print, and general features toassign a final grade based on a predefined scale, such as rangingbetween A and F, wherein A is for the best condition. System 100 caninclude a processor 110 and a memory 120. The processor can be any logiccircuitry that responds to, and processes instructions fetched from thememory. The memory may include one or more memory chips capable ofstoring data and allowing any storage location to be directly accessedby the processor. The memory includes modules according to the presentinvention for execution by the processor to perform one or more steps ofthe disclosed methodology.

The system can further include a network circuitry 130 for connecting toa network 180. The system 100 can connect to a user device 190 throughthe network. The user device can be a desktop, laptop, smartphone,tablet computer, digital camera system, and the like. It is understood,however, that FIG. 1 shows the system 100 and user device 190 as twoseparate devices, however, the system can be embodied in the user devicewithout departing from the scope of the present invention. The networkcan be a wired, wireless network, or a combination of wired and wirelessnetworks. For example, the network may be a local area network (LAN), awide area network (WAN), a wireless WAN, a wireless LAN (WLAN), ametropolitan area network (MAN), a wireless MAN network, a cellular datanetwork, a cellular voice network, the Internet, etc. The network can bea secured or unsecured network.

The memory 120 can include an interface module 140, an image processingmodule 150, a ranking module 160, and a catalog module 170. Theinterface module 140 upon execution by the processor can provide aninterface for the user to interact with the disclosed system. The imageprocessing module upon execution by the processor can process an imageof the card for use by the ranking module 160. The ranking module, alsoreferred to herein as the machine learning module upon execution by theprocessor can provide for training a machine learning model and usingthe machine learning model can grade the trading card using the imagequantitative received from the image processing module. The catalogmodule can store the image with grading information in a sharableformat.

The interface module allows a user to interact with the disclosedsystem, wherein the user can upload and download information from thesystem using the interface. The user can upload the image using theinterface. The interface can be provided as application software thatcan be installed on the user device. The application software can bedeveloped for Android™, iOS, and any other known operating platform formobile devices. The application software can be made available through adistribution service provider, for example, Google PIay™ operated anddeveloped by Google, and the app store by Apple. In addition to theapplication software, a website-based interface can also be providedthrough the world-wide-web. The application software can also beprovided for the desktop environment, such as Windows™, Linux, andmacOS. The interface may permit interaction with a user through the userdevice, wherein information can be presented within the interface by thesystem 100 and information can be received by the system 100 from theuser. The gradings, the image of the card, and a catalog that includesthe cataloged card can also be presented to the user through theinterface.

First, the user can access the disclosed system through the interface.The user can be provided with login credentials such as a username andpassword for secure access. The user can then upload an image of thetrading card using the interface, wherein the system can receive theuploaded image of the card, at step 210. The interface can allow a userto capture the image of the card using a camera coupled to the userdevice. For example, the user can use his smartphone to capture theimage and upload the same. Any suitable camera can be used such as thosethat come in-build in smartphones, or a separate handheld camera canalso be used. The interface may also allow a user to upload a filealready stored in the memory of the user device. For example, theinterface may allow the user to locate the file on the memory of theuser device using the file system of the user device. The system canverify the uploaded image based on predefined rules. Should there be anyerror in the processing of the image, the error can be displayed to theuser through the interface. The system can optionally save the imagereceived in the memory of the system.

The image can be converted to a gray scale by the image processingmodule, at step 220. Thereafter, an edge detection algorithm can beapplied to extract the edges of the image, at step 230. A thresholdinversion algorithm can then apply to extract contrast/centeringfeatures, at step 240. A wavelet transform algorithm is then applied toextract texture/surface features, at step 250. A corner detectionalgorithm is applied to extract corner information, at step 260. A colorfiltering algorithm is applied to extract stain detection features 270.An image sharpen algorithm is applied and the output is compared withthe original image to extract out-of-focus information, at step 280. Theimage features and information obtained at each of the steps from 230 to280 can be subjected to a bag-of-visual-words model to obtainquantitative image data. The bag-of-visual-words model is known incomputer vision technologies. The bag-of-visual-words model is adaptedfrom Natural Language Processing (NLP)Ts bag of words (BoW). In a bag ofwords, is counted the number of each word that appears in the referenceddocument, use the frequency of each word to extract the keywords of thedocument, and make a frequency histogram from it. The same concept isapplied as a visual bag of words, in the case of image classification,wherein the image features are considered as “words”. Image features aresimply patterns detected in an image. Features are detected anddescriptors for each feature are extracted from the input image andbuilt into a visual dictionary.

A pre-trained machine learning module can then process the quantitativeimage data to classify the image and obtain a grade for the collectibletrading card. The training dataset can be prepared from n trainingimages. The training images can be pre-processed by subjecting eachtraining image to the image proccing module as shown in FIG. 2. Thepre-processed images can be subjected to classification methods. Thetraining images are manually classified and labeled by the gradesassigned to them initially. The grades for the training data may besourced from professional graders in the field or a set of previouslygraded cards. The grades for each training image can include surface,corner, edge, and centering grades. Numeric class labels are assigned toeach training image in each set. Numeric class labels are numbers from 1to 10 that are calculated by taking the average of the surface, corner,edge, and centering grades (also on a scale of 1 to 10) of each trainingimage.

The extracted feature vector for each set of training images is savedinto a list. MultiClass SupportVectorMachines/Neural Networks are used,with a variety of selection strategies including but not limited toSequential Selection and a variety of kernels including but not limitedto Chi Square. The kernel is trained by adjusting the complexity,tolerance, cache size, and selection strategy to get the best-matchedoutput grades for the training images. The extracted feature vector issaved for the target edge extraction image. The extracted feature vectoris passed into the trained and saved models to grade edges. A weightedformula is applied to all component grades with increased weightagegiven to edges, corners, and surfaces, to find the final card conditiongrade. The component grade and final grade are mapped to a scale rangingfrom A to F or 1 to 10, or any comparable grading scales as needed. Thereceived image data received from the image processing module can beprocessed by the machine learning model using the trained model to rankthe image on the predefined scale. The interface can allow the user toshare the digitalized card with ranking and catalog information onsocial networking platforms.

GRAYSCALE CONVERSION PREPROCESSING ALGORITHMS: In one implementation ofgenerating the grayscale versions of the input images is to calculatethe average of the red, green, and blue pixels. This combines theluminance contributed by each color band into a reasonable grayapproximation. The technique of gamma compression may also be utilized,such that it warps the color scale so that it contributes more value inthe lower end of the range and spreads them out more widely in thehigher end. The benefit of gamma compression is that it gets rid of thebanding in smoothly varying dark colors. However, to do any further bandmanipulation like addition, subtraction or average, the compression willneed to be undone or transformed into a more linear representation ofthe luminance. In addition, gamma compression and decompression can slowdown the process, as well as disrupt the extraction of features neededfor the accurate grading of sports and other trading cards. To avertthis, we use a linear approximation technique utilizing the followingequation and specified coefficients.

Grayscale Pixel=0.49R+0.321G+0.237B

This is known as the RMY algorithm, and any equivalent set ofcoefficients may be utilized. Color images are represented asthree-dimensional numeric arrays—three two-dimensional arrays—one eachfor red, green, and blue channels. Each one has one value per pixel andtheir ranges are identical. The range of pixel values is from 0 to 22.Lower numeric values indicate darker shades and higher values indicatelighter shades. The values can be divided by 255 to get a range ofvalues from 0 to 1. The grayscale images are the inputs to the nextstage of preprocessing algorithms in the grading pipeline.

EDGE DETECTION PREPROCESSING ALGORITHMS: Edge detection techniques aresimply image processing techniques to identify points in a digitalimage, with discontinuation or sharp changes in the image brightness.Edge detection is a key processing step in the fields of imageprocessing, pattern recognition, and computer vision. The convolutionoperation is used for processing high-resolution digital images. Theedge detection methods used for card grading include but are not limitedto Sobel edge detection, Laplacian edge detection, Prewitt edgedetection, and Canny edge detection. The Sobel edge detection uses afilter that gives more emphasis to the center of the filter. Laplacianedge detection uses one filter called a kernel and performs second-orderderivatives, which is more effective than Sobel edge detection. Thedisadvantage is that it is sensitive to noise, especially Gaussiannoise. This can be reduced with the use of Gaussian smoothing. The mosteffective and complex technique is the Canny edge detection, which is amulti-stage algorithm that includes converting the input image tograyscale first, reducing noise since any edge detection that usesderivatives is sensitive to noise, and calculating the gradient to helpidentify the edge intensity and direction, applying non-maximalsuppression to thin the edges of the image, applying a double thresholdto identify the strong, weak and irrelevant pixels in the image andfinally using hysteresis edge tracking to convert weak pixels intostrong ones, only if there is a strong pixel around it.

SURFACE FEATURE DETECTION PREPROCESSING ALGORITHMS: Spatial domain is anormal image space that is represented as a matrix of pixels.Transformation techniques are directly applied to image pixel values.The frequency domain is the rate at which these pixel values change inthe spatial domain. Here, frequency refers to the rate of change ofcolor components in an image. Areas of high frequencies correspond torapid color changes while areas of low frequencies correspond to gradualchanges. Transformation techniques cannot operate directly on the image,unlike the spatial domain. The image first needs to be transformed intoits frequency distribution before processing it. The output is not animage but a transformation. Inverse transformation may be applied to theprocessed output. Surface feature detection for card grading utilizesmathematical transforms under the frequency domain, including but notlimited to Fourier transform, Laplace transform, Z-transform and wavelettransform. The wavelet analysis method is a time-frequency method thatselects the approximate frequency band adaptively, based on thecharacteristics of the signal. The frequency band then matches thespectrum which improves the time-frequency resolution. Wavelet is simplya wave-like oscillation with an amplitude that begins at zero,increases, and then decreases back to zero and can be visualized as abrief oscillation. Fourier transformation has the disadvantage of notincluding temporal details. High-frequency resolution corresponds withpoor temporal resolution and vice versa. To overcome the drawbacks ofthe Fourier methods, wavelets are functions that are concentrated intime and frequency around a certain point. The most appropriate use forwavelet transform is in the case of non-stationary signals since itachieves good frequency resolution for low-frequency components and hightemporal resolution for high-frequency components. Wavelet analysis isused to divide the information present on an image, considered assignals, into two discrete components - approximations and details(sub-signals). Wavelet transform is also used to remove noise in animage, especially Gaussian noise, using global thresholding in theimage's frequency distribution after performing wavelet decomposition.The thresholding used may be both soft and hard thresholding. Softthresholding is the process of first setting the coefficients to zero,whose absolute values are lower than the threshold, and then shrinkingthe nonzero coefficients to zero. Hard thresholding is the process ofsetting to zero, the coefficients, whose absolute values are lower thanthe threshold. The steps are as follows:

1) Estimate the threshold for all detailed coefficients.2) Apply the threshold on all levels.3) The output is the denoised matrix for all the detailed components atevery level.4) Use matrices or coefficients for inverse discrete wavelengthtransformation to reconstruct the image. This yields the denoisedreconstructed image.

The discrete wavelet transforms (DWT) of a one-dimensional signal f[n]can be calculated by passing it through a high pass and low pass filtersimultaneously. If a low pass filter has impulse response g[n], then DWTcan be evaluated by calculation, the convolution of the original signalwith the impulse response at y[n]=(x*y)[n], Wherein, x is theone-dimensional signal (image), y is the impulse response of the lowpass file, * is the complex conjugate.

The signal is simultaneously decomposed with a high pass filter. Thewavelet decomposition utilizes various wavelet techniques, including butnot limited to Daubechies-4 wavelet techniques, Haar simple wavelettechniques, Shannon wavelet techniques, and Gabor complex wavelettechniques. The Haar wavelet is preferred for purposes of grading cardssince this is the simplest type of Daubechies wavelet, reproducingconstant functions only and working well for the square waves involvedin the process.

The output of the images that are passed through the texture and surfacefeature detection preprocessing algorithms are passed into the nextsteps of the grading pipeline, including conversion into feature vectorsand use with training and testing models.

CORNER DETECTION PREPROCESSING ALGORITHM: The corner detection algorithmis a mathematical way of determining which windows produce largevariations when moved in any direction. A score of R is associated witheach window. Corners are regions in the image with large variations inintensity in all directions. Corner detection for card grading utilizesalgorithms including but not limited to the Harris Corner Detector andthe Shi-Tomasi Corner Detector. This finds the difference in intensityfor a displacement of (u, v) in all directions.

Difference in intensity=Window function(Shifted intensity−Intensity)

The window function can either be a rectangular window or a Gaussianwindow which gives weights to pixels underneath. At this point, anequation is applied to generate a score to determine if a window has ahigh probability of containing a corner or not.

R=det(M)−k(trace(M))2R=det

M−k trace M2

Wherein, det(M)=λ1 λ2, trace(M)=λ1+λ2, λ1 and λ2 are the eigenvalues ofM

So, the magnitudes of these eigenvalues decide whether a region is acorner, an edge, or a flat. When |R| is small, i.e., when λ1 and λ2 aresmall, the region is flat. When R<0, i.e., when λ1>>λ2 or vice versa,the region is an edge. When R is large, which happens when λ1 and λ2 arelarge, and λ1^(˜)λ2, the region is a corner. The result is a grayscaleimage with the above-calculated scores. Thresholding for a suitablescore gives you the corners in the image.

The card grading process further builds up the corner detectionalgorithm to extract only the four vertices that are traditionally usedin manual card grading. While the output of the previous step may beused to further strengthen the observations of the edge detection aswell as the surface detection, eliminating all other detected corners,other than the four physical corners, help refine the true cornerdetection results. This is done by automatically slicing the card imageinto four pieces and using a predefined window to extract the expectedcorner from the four image pieces and utilizing only the scoresassociated with these highlighted corners to prepare the inputs for thesub-grading process for grading corners.

CENTERING GRADE PREPROCESSING ALGORITHMS: The preprocessing steps fordetermining the centering grade involve both grayscale conversion andthreshold inversion. We do not use measurements of the distance from theedges since this leads to erroneous results in the case of cards withouta distinct border or die-cut cards or cards with images bleeding overthe edges. To ensure that the centering grades are accurate in all casesincluding the few mentioned above, a method was developed to measure theamounts of black and white on both sides after applying the thresholdinversion method.

The threshold inversion for the card grading process utilizes variousbinary thresholding algorithms, including but not limited to simplethresholding, adaptive thresholding, Otsu's binarization, etc. Forsimple binary thresholding, the same threshold value is applied forevery pixel. If the pixel value is smaller than the threshold, it is setto 0, otherwise, it is set to a maximum value. Simple binarythresholding will not work well with images that have different lightingconditions in different areas. This is solved using adaptivethresholding. The threshold is determined for a pixel based on a smallregion around it. This means that different regions of the same imagewill get different thresholds and better results for images with varyinglevels of illumination.

Adaptive thresholding can be either adaptive mean thresholding oradaptive gaussian thresholding. In adaptive mean thresholding, thethreshold value is the mean of the neighborhood area, while in adaptivegaussian thresholding, the threshold value is a gaussian weighted sum ofthe neighborhood values.

After thresholding has been achieved, the image is split into two halvesand the black and white pixels on either side are counted and added toget four distinct values—left white count, left black count, right whitecount, and right black count. This is followed by calculating the whiteand black centering ratios by dividing the right white count by the leftwhite count and the right black count by the left black count. Theseratios are then compared against the following thresholds to determinethe centering grades of the card.

The output of the images that are passed through the centeringpreprocessing algorithms is passed into the next steps of the gradingpipeline, including conversion into feature vectors and use withtraining and testing models.

TABLE 1 White/Black Ratio Thresholds & Corresponding Centering Grade:Condition Centring Grade W/B ratio > 1.2 & W/B ratio < 1.5 10 W/Bratio > 1.5 & W/B ratio < 1.8 9 W/B ratio > 1.8 & W/B ratio < 2.3 8 W/Bratio > 2.3 & W/B ratio < 3 7 W/B ratio > 3 & W/B ratio < 4 6 W/Bratio > 4 & W/B ratio < 5 5 W/B ratio > 5 & W/B ratio < 6 4 W/B ratio >6 & W/B ratio < 9 3 W/B ratio > 9 2 W/B ratio > 10 1

STAIN DETECTION PREPROCESSING ALGORITHMS: For stain detection, colorsegmentation or color filtering algorithms are adapted as apreprocessing step in the card grading process. Color segmentation isused for identifying specific regions having a specific color. RGB coloris most widely used and is called an additive color space as thethree-color shades add up to give color to the image. The threshold canbe utilized to create a stain mask to separate the different colors. Inaddition to the RGB space, HSV space may also be utilized, which may beslightly better suited for purposes of stain detection in card grading,due to the advantage of localization.

OUT-OF-FOCUS DETECTION PREPROCESSING ALGORITHMS: To determine whether toassign the out-of-focus qualifier to a card, the IMAGE SHARPENINGALGORITHM is applied, and the output is compared pixel-wise to theoriginal image to decide if the difference in sharpness exceeds acertain preset threshold. If the difference exceeds the predeterminedthreshold, and the card achieves a perfect score on all other fronts, anout-of-focus qualifier is assigned to the card.

Image sharpening algorithms include but are not limited to unsharpmasking (USM). A simple sharpening algorithm subtracts a fraction ofneighboring pixels from each pixel. The unsharp mask filter algorithminvolves the subtraction of an unsharp mask from the specimen image. Anunsharp mask is simply a blurred image that is produced by spatiallyfiltering the specimen image with a Gaussian low-pass filter.

The size of the Gaussian kernel mask is a function of the parameter. Thesize of the kernel mask determines the range of frequencies that areremoved by the Gaussian filter. Increasing the size of the kernel maskcauses the Gaussian filter to remove a greater number of spatialfrequencies from the unsharp mask image. The unsharp mask is thensubtracted from the original image.

An unsharp mask filter operates by subtracting appropriately weightedparts of the unsharp mask from the original mask. The unsharp maskfilter is preferred over other sharpening filters due to the flexibilityof control since the parameters can be adjusted to be optimal for cardgrading purposes. The unsharp mask filter enhances edges and fine detailin the uploaded card image because the sharpening filters suppresslow-frequency detail.

The sharpened images are then pixel-wise subtracted like the subtractionof the unsharp mask above, and the output is then thresholded andcompared to determine if the difference in sharpness is above a certainthreshold to justify the application of an out-of-focus qualifier to thegrading report.

Machine learning algorithms such as Support Vector Machines (SVM) and Alalgorithms such as Neural networks are used in the final stage toclassify the preprocessed image vectors.

In one implementation, disclosed is a method for digitally grading thecollectible trading cards using an image of the card. First, save theuploaded image of the collectible trading card to the cloud. The gradingprocess can auto-start for grading the image of the card. The latestungraded image can be retrieved from the cloud. The image can then beconverted to a grayscale image. An edge detection algorithm can beapplied to extract edges. An inversion algorithm can be applied toextract contrast/centering features. A wavelet transform algorithm canbe applied to extract texture. A corner detection algorithm can beapplied to extract corners. A color filtering algorithm can be appliedto extract stain detection features. An image sharpening algorithm canbe applied to compare with the original image for focus detection. Theoutput of each algorithm can be processed to obtain a bag of visualwords.

In one implementation, a trained machine learning model is disclosedthat can grade the above-obtained image features for digitally gradingthe collectible trading card. Disclosed is a method for training themachine learning model. First, a set of pre-graded training images ofcollectible trading cards can be received by the system. The trainingimages can be subjected to steps 220 to step 280 of FIG. 2. Thedifferent algorithms explained above can be applied to each of thetraining images to obtain the respective features and information. Theoutput of each algorithm, as in steps 230 to 280, can be processed bythe bag-of-visual-words model to obtain the respective quantitativedata. Thereafter, the numeric labels can be assigned to each set ofprepared training images.

The quantitative data for each output of the algorithms can be furtherprocessed. The extracted feature vector for each output of each trainingimage can be saved to a list. Thereafter, multiclassSupportVectorMachines/neural networks can be used using a variety ofselection strategies including but not limited to the sequentialselection and a variety of kernels including but not limited toChi-square. Train the kernel by adjusting the complexity, tolerance,cache size, and selection strategy to get the best-matched output gradesfor the training images. The extracted feature vector can be saved.Thereafter, can pass the extracted feature vector into the trained andsaved model for grading the respective quantitative data of the outputof different feature extraction algorithms i.e., corners detectionfeature vector output for training and target images to get cornersgrade, surface/texture detection feature vector output for training andtarget images to get surface grades, stain detection feature vectoroutput for training and target images to get stain detection grade,image sharpen/comparison feature vector output for training and targetimages to get out of focus grade.

Once all the features could be graded by the respective feature vector,a weighted formula can be applied to all component grades with increasedweightage given to edges, corners, and surfaces to find the final cardcondition grade. The component grades and the final grade can be mappedto a scale ranging from A to F or 1 to 10 or similar grades. A headerwith the final grade printed on the label with the accompanying scaleand logo can be generated. Finally, the intermediate card outputs can besaved to the cloud,

While the foregoing written description of the invention enables one ofordinary skill to make and use what is considered presently to be thebest mode thereof, those of ordinary skill will understand andappreciate the existence of variations, combinations, and equivalents ofthe specific embodiment, method, and examples herein. The inventionshould therefore not be limited by the above-described embodiment,method, and examples, but by all embodiments and methods within thescope and spirit of the invention as claimed.

What is claimed is:
 1. A method for grading a collectible trading cardon a predefined scale, the method implemented with a system comprising aprocessor and a memory, the method comprises: receiving, an image of thecollectible trading card from a user device; converting the image to agrayscale image; applying an edge detection algorithm to the grayscaleimage to extract edge features; applying a threshold inversion algorithmto the grayscale image to extract contrast/centering features; applyinga wavelet transform algorithm to the grayscale image to extracttexture/surface features; applying a corner detection algorithm to thegrayscale image to extract corner information; applying a colorfiltering algorithm to the grayscale image to extract stain detectionfeatures; applying an image sharpen algorithm to the grayscale image toobtain an output and comparing the output with the image to obtainout-of-focus information; processing the edge features,contrast/centering features, texture/surface features, cornerinformation, stain detection features, and out-of-focus informationusing a bag-of-visual-words model to obtain quantitative data; andsubjecting the quantitative data to a pre-trained machine learning modelto obtain a grade for the collectible trading card, wherein the grade isassociated to the collectible trading card.
 2. The method according toclaim 1, wherein the method further comprises: capturing the image ofthe collectible trading card by a camera coupled to the user device. 3.The method according to claim 1, wherein the method further comprises:training a machine learning model using a set of pre-graded trainingimages of collectible trading cards to obtain the pre-trained machinelearning model.
 4. The method according to claim 3, wherein the methodfurther comprises: converting each training image of the pre-gradedtraining images to a grayscale training image; processing each grayscaletraining image using a plurality of predefined algorithms to obtain aplurality of outputs, the plurality of predefined algorithms comprisethe edge detection algorithm, the threshold inversion algorithm, thewavelet transform algorithm, the corner detection algorithm, the colorfiltering algorithm, and the image sharpen algorithm; subjecting theplurality of outputs to the bag-of-visual-words model to obtainrespective quantitative data for each output; and generating a featurevector for each output using the respective quantitative data, whereinthe feature vector is configured to grade the respective output based onthe respective quantitative data.
 5. A system for grading a collectibletrading card on a predefined scale, the system comprising a processorand a memory, the system configured to implement a method, the methodcomprises: receiving, an image of the collectible trading card from auser device; converting the image to a grayscale image; applying an edgedetection algorithm to the grayscale image to extract edge features;applying a threshold inversion algorithm to the grayscale image toextract contrast/centering features; applying a wavelet transformalgorithm to the grayscale image to extract texture/surface features;applying a corner detection algorithm to the grayscale image to extractcorner information; applying a color filtering algorithm to thegrayscale image to extract stain detection features; applying an imagesharpen algorithm to the grayscale image to obtain an output andcomparing the output with the image to obtain out-of-focus information;processing the edge features, contrast/centering features,texture/surface features, corner information, stain detection features,and out-of-focus information using a bag-of-visual-words model to obtainquantitative data; and subjecting the quantitative data to a pre-trainedmachine learning model to obtain a grade for the collectible tradingcard, wherein the grade is associated to the collectible trading card.6. The system according to claim 5, wherein the method furthercomprises: capturing the image of the collectible trading card by acamera coupled to the user device.
 7. The system according to claim 5,wherein the method further comprises: training a machine learning modelusing a set of pre-graded training images of collectible trading cardsto obtain the pre-trained machine learning model.
 8. The systemaccording to claim 7, wherein the method further comprises: convertingeach training image of the pre-graded training images to a grayscaletraining image; processing each grayscale training image using aplurality of predefined algorithms to obtain a plurality of outputs, theplurality of predefined algorithms comprise the edge detectionalgorithm, the threshold inversion algorithm, the wavelet transformalgorithm, the corner detection algorithm, the color filteringalgorithm, and the image sharpen algorithm; subjecting the plurality ofoutputs to the bag-of-visual-words model to obtain respectivequantitative data for each output; and generating a feature vector foreach output using the respective quantitative data, wherein the featurevector is configured to grade the respective output based on therespective quantitative data.